#include<bits/stdc++.h>
using namespace std;
const int maxn = 2e5+9;
int n;
int he[maxn];
int main() {
  cin>>n;
  for(int i=1; i<=n; ++i) cin>>he[i];
  sort(he+1, he+n+1);
  double f = 1.1;
  for(int b=1; b<=n; ++b) {
    if(he[b]>b) {
      cout<<"-1\n";
      return 0;
    }
    double h = he[b];
    double p = h / b;
    if(p<f)f=p;
  }
  cout<<f<<'\n';
}